<template >
    <h1>主页</h1>
    <ul>
        <li><router-link to="/main/news">新闻管理</router-link></li>
        <li><router-link to="/main/password">密码管理</router-link></li>
    </ul>
    <div class="main"><router-view></router-view></div>
</template>
<script setup>
import { onBeforeRouteUpdate} from 'vue-router'
onBeforeRouteUpdate((to, from) => {console.log(to)})
</script>
<style >
    .main{
        width: 1000px;
        height: 500px;
        margin: 0 auto;
        border: 1px solid black;
    }
</style>